<!-- 车辆管理|detail:详情,forbidden:禁用,storage:入库,startusing:启用,edit:编辑,delete:删除 -->
<div >
	<div>
		<form class="layui-form" action="" method="get">
			<div class="layui-form-item">
				<input type="hidden" name="op" value="{$Think.get.op}" />
				{if $Think.get.state}
				<input type="hidden" name="state" value="{$Think.get.state}" />
				{/if}
				<div class="layui-input-inline">
					<input type="text" name="car_type_name" placeholder="请输入车型" class="layui-input" value="{$Think.get.car_type_name}">
				</div>
				<div class="layui-input-inline">
					<input type="text" name="number" placeholder="请输入车牌号"  class="layui-input"  value="{$Think.get.number}">
				</div>
				<div class="layui-input-inline">
					<input type="text" name="company_name" placeholder="点击选择公司/单位" class="layui-input"  value="{$Think.get.company_name}">
				</div>
				<div class="layui-input-inline">
					<input type="text" name="" placeholder="请输入租赁公司" class="layui-input"  value="">
				</div>
				
				
				<div>
					<button class="layui-btn layui-btn layui-btn-normal" lay-submit lay-filter="formDemo">查询</button>
					<button type="reset" class="layui-btn layui-btn-primary">重置</button>
					<button type="button" class="layui-btn layui-btn-primary" id="more">查看更多</button>
				</div>
				
			</div>
			<div class="layui-form-item" id="showmore" style="display: none;margin-top: 5px;">
				<div class="layui-input-inline">
					<select name="car_state" class="filter_type" >
							<option {$Think.get.filter_type?'':selected} value="0">车辆筛选-全部</option>
							<option {$Think.get.filter_type==1?selected:""} value="1">公务车辆</option>
							<option {$Think.get.filter_type==2?selected:""} value="2">自营车辆</option>
							<option {$Think.get.filter_type==3?selected:""} value="3">租赁车辆</option>
							<option {$Think.get.filter_type==4?selected:""} value="4">加盟车辆</option>
					</select>
				</div>
				<div class="layui-input-inline">
					<select name="filter_type" class="car_state" >
						<option {$Think.get.filter_type?:selected} value="0">车辆状态-全部</option>
						<option {$Think.get.filter_type==1?selected: ""} value="1">在线-停止</option>
						<option {$Think.get.filter_type==2?selected: ""} value="2">在线-行驶</option>
						<option {$Think.get.filter_type==3?selected: ""} value="3">离线</option>
						<option {$Think.get.filter_type==4?selected: ""} value="4">终端没电</option>
					</select>
				</div>
			</div>
		</form>
	</div>
	<div>
		<div class="layui-btn-group">
		  <button class="layui-btn layui-btn-sm add layui-btn-primary">
		    <i class="layui-icon">&#xe654;</i>
		  </button>
		 
		  <button class="layui-btn layui-btn-sm delete-multiple layui-btn-primary">
		    <i class="layui-icon">&#xe640;</i>
		  </button>
		</div>
		<div class="table_margin_0">
			<table  class="layui-hide" id="car" lay-filter="car"></table>
			<div id="page"></div>
		</div>
		<!--<script type="text/html" id="titleTpl">
		  {{#  if(d.id < 100){ }}
		    <a href="/detail/{{d.id}}" class="layui-table-link">{{d.title}}</a>
		  {{#  } else { }}
		    {{d.title}}(普通用户)
		  {{#  } }}
		</script>-->
		{if $Think.get.op}
		<script type="text/html" id="choose">
			<a class="layui-btn layui-btn-xs" lay-event="choose">选中</a>
			<a class="layui-btn layui-btn-xs layui-btn-primary" lay-event="detail" data-btn='detail'>查看</a>
		</script>
		{else/}
		<script type="text/html" id="operation">
			{{# if(d.state==1){ }}
			<a class="layui-btn  layui-btn-xs layui-btn-orange" lay-event="forbidden" data-btn='forbindden'>禁用</a>
			{{# }else if(d.state==6){ }}
			<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="storage" data-btn='storage'>入库</a>
			{{# }else{ }}
			<a class="layui-btn layui-btn-xs layui-btn-orange" lay-event="startusing" data-btn='startusing'>启用</a>
			{{# } }}
			<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit" data-btn='edit'>编辑</a>
			<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del" data-btn='delete'>删除</a>
			
			
		</script>
		
		<script type="text/html" id="state">
		  <!-- 这里的 checked 的状态只是演示 -->
		  <!--<div>{{d.state}}</div>-->
		  <input type="checkbox" name="sex" value="{{d.state}}" lay-skin="switch" lay-filter="state" lay-text="启用|禁用" {{ d.state == 1 ? 'checked' : '' }} >
		</script>
		
		{/if}
	</div>

</div>
<script type="text/html" id="carId">
  <a href="{:url('html/car/car_detail')}?car_id={{d.car_id}}&number={{d.number}}" class="layui-table-link">{{ d.number }}</a>
</script>
<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.2&key={:config('base.mapkey')}&plugin=AMap.Driving"></script>
<script src="//webapi.amap.com/ui/1.0/main.js?v=1.0.11"></script>